package com.xmg.design23.d1_factory.abstrac;

import com.xmg.design23.d1_factory.simple.Fruit;

/**
 * @Author: mazhongqing
 * @Date: 2021/3/24 15:20
 */
public class Test {
    public static void main(String[] args) {
        IFactory appFactory = new AppleFactory();
        Fruit apple = appFactory.create();
        IFactory pearFactory = new PearFactory();
        Fruit pear = pearFactory.create();
        apple.eat();
        pear.eat();
    }
}
